#pragma once
#include <algorithm>
#include <nice2d/misc.h>

template<class T>
struct Range {
    Range()
    {}

    Range(T inputLow, T inputHigh):
        low(inputLow),
        high(inputHigh)
    {}

    Range(const Range &other):
        low(other.low),
        high(other.high)
    {}

    Range(const Range &&other):
        low(std::move(other.low)),
        high(std::move(other.high))
    {
    }

    Range operator= (const Range<T> &other)
    {
        low = other.low;
        high = other.high;
        return *this;
    }

    bool isValid()const
    {
        return low <= high;
    }

    bool isFixed()const
    {
        return isEqual<T>(low, high);
    }

    T low, high;
};

using RangeFloat = Range<float>;
